
#include <QCoreApplication>
#include <QTextStream>
#include <QDebug>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    
#ifdef QT_DEBUG
    qDebug() << "Hello World";
#else
    QTextStream(stdout) << "Hello World" << "\n";
#endif

    return 0;
}

// Output:
    
// Hello World